<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN" 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
    //how do I print this thing?
    print '<'
    print '%'
    print '@ taglib prefix="s" uri="/struts-tags" '
    print '%'
    print '>'
%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>${title}</title>
	<style>

  </style>
</head>
<body>
    <table class="modelIndexTable data">
        <tr>
<%
   getters.each({
         def indent = '\t'*3
         println "${indent}<th>${it}</th>"
   })
%>
            <th>Actions</th>
        </tr>
        <s:iterator value="modelList">
        <tr>
<%
   getters.each({
         def indent = '\t'*3
         println "${indent}<td><s:property value='%{${it}}'/></td>"
   })
%>
        <td>
            <s:url var="editUrl" namespace="/${actionName}" action="edit">
                <s:param name="id" value="%{id}" />
            </s:url>
            <s:url var="deleteUrl" namespace="/${actionName}" action="delete">
                <s:param name="id" value="%{id}" />                    
            </s:url>
            <span class="linkWithImage"><s:a cssClass="edit" href="%{#editUrl}">Edit</s:a></span>
            <span class="linkWithImage"><s:a cssClass="delete" href="%{#deleteUrl}">Delete</s:a></span>
        </td>
        </tr>
        </s:iterator>
    </table>
    <s:url var="newUrl" namespace="/${actionName}" action="new" />
    <span class="linkWithImage"><s:a cssClass="create" href="%{#newUrl}">New ${modelName}</s:a></span>
</body>
</html>